﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Tasdeed.aspx.cs" Inherits="Tasdeed" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style2
        {
            width: 167px;
        }
        .style6
        {
            width: 101px;
        }
        .style7
        {
            width: 108px;
        }
        .style11
        {
            width: 100px;
        }
        .style12
        {
            width: 95px;
        }
        .style13
        {
        }
        .style14
        {
            width: 194px;
        }
        .style15
        {
            width: 153px;
        }
        .style16
        {
            width: 79px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table style="border: 1px solid #000; width:100%;">
            <tr>
                <td class="style12" style="border: 1px solid #000;">
                    Bill Number :</td>
                <td class="style2" style="border: 1px solid #000;">
                    <asp:DropDownList ID="DropDownList1" runat="server" Width="155px" 
                        DataSourceID="SqlDataSource1" DataTextField="bill" DataValueField="bill" 
                        AutoPostBack="True" 
                        onselectedindexchanged="DropDownList1_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:nourcenterConnectionString %>" 
                        SelectCommand="SELECT DISTINCT [bill] FROM [tasdeed] ORDER BY [bill] DESC">
                    </asp:SqlDataSource>
                </td>
                <td class="style7" style="border: 1px solid #000;">
                    &nbsp;</td>
                <td class="style6" style="border: 1px solid #000;">
                    &nbsp;</td>
                <td class="style6" style="border: 1px solid #000;">
                    &nbsp;</td>
                <td class="style11" style="border: 1px solid #000;">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style12" style="border: 1px solid #000;">
                    Date :</td>
                <td class="style2" style="border: 1px solid #000;">
                    <asp:Label ID="Label1" runat="server"></asp:Label>
                </td>
                <td class="style7" style="border: 1px solid #000;">
                    Supplier Name :</td>
                <td class="style6" style="border: 1px solid #000;">
                    <asp:Label ID="Label2" runat="server"></asp:Label>
                </td>
                <td class="style6" style="border: 1px solid #000;">
                    Kind :</td>
                <td class="style11" style="border: 1px solid #000;">
                    <asp:Label ID="Label3" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style12" style="border: 1px solid #000;">
                    Brand Name :</td>
                <td class="style2" style="border: 1px solid #000;">
                    <asp:Label ID="Label4" runat="server"></asp:Label>
                </td>
                <td class="style7" style="border: 1px solid #000;">
                    Total Cost :</td>
                <td class="style6" style="border: 1px solid #000;">
                    <asp:Label ID="Label5" runat="server"></asp:Label>
                </td>
                <td class="style6" style="border: 1px solid #000;">
                    Indebtedness :</td>
                <td class="style11" style="border: 1px solid #000;">
                    <asp:Label ID="Label6" runat="server"></asp:Label>
                </td>
            </tr>
            </table>
    
    </div>
    <br />
    <table style="width: 100%; border: 1px solid #000;">
        <tr>
            <td class="style14" style="border: 1px solid #000;">
                Supplier Name :</td>
            <td class="style14" style="border: 1px solid #000;">
                <asp:DropDownList ID="DropDownList2" runat="server" 
                    DataSourceID="SqlDataSource2" DataTextField="supplyername" 
                    DataValueField="supplyername" Width="155px" AutoPostBack="True" 
                    onselectedindexchanged="DropDownList2_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:nourcenterConnectionString %>" 
                    SelectCommand="SELECT DISTINCT [supplyername] FROM [tasdeed]"></asp:SqlDataSource>
            </td>
            <td class="style15" style="border: 1px solid #000;">
                Total
                    Indebtedness :</td>
            <td style="border: 1px solid #000;" class="style16">
                <asp:Label ID="Label7" runat="server"></asp:Label>
            </td>
            <td style="border: 1px solid #000;">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style13" colspan="5" style="border: 1px solid #000;">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    DataSourceID="SqlDataSource3">
                    <Columns>
                        <asp:BoundField DataField="bill" HeaderText="bill" SortExpression="bill" />
                        <asp:BoundField DataField="datee" HeaderText="date" SortExpression="datee" />
                        <asp:BoundField DataField="kind" HeaderText="kind" SortExpression="kind" />
                        <asp:BoundField DataField="brandname" HeaderText="brandname" 
                            SortExpression="brandname" />
                        <asp:BoundField DataField="totalcost" HeaderText="totalcost" 
                            SortExpression="totalcost" />
                        <asp:BoundField DataField="Indebtedness" HeaderText="Indebtedness" 
                            SortExpression="Indebtedness" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:nourcenterConnectionString %>" 
                    SelectCommand="SELECT [bill], [datee], [kind], [brandname], [totalcost], [Indebtedness] FROM [tasdeed] WHERE ([supplyername] = @supplyername)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownList2" Name="supplyername" 
                            PropertyName="SelectedValue" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
